import {
    center,
    grid,
    formTitle,
} from '@/css/DialogsCss.module.scss';

export default {
    title: '客户详情',
    dialog: {
        size: '50%'
    },
    onMounted: [{
        action: 'set',
        target: '$widgets.formBasic',
        field: 'value',
        value: '$params'
    }, {
        action: 'set',
        target: '$widgets.formCommerce',
        field: 'value',
        value: '$params'
    }, {
        action: 'set',
        target: '$widgets.formContact',
        field: 'value',
        value: '$params'
    }, {
        action: 'set',
        target: '$widgets.formOperationScope',
        field: 'value',
        value: {
            'operation_scope': '$params.operation_scope'
        }
    }],
    items: [{
        region: 'center',
        layout: 'vertical',
        items: [{
            class: center,
            layout: 'vertical',
            items: [{
                layout: 'horizontal',
                flex: true,
                items: [{
                    class: formTitle,
                    id: 'title',
                    widget: 'public-title',
                    title: '基础信息',
                }, {
                    id: 'tags',
                    widget: 'data-tags',
                    addVisible: true,
                    addSize: 'small',
                    value: [{
                        type: 'success',
                        value: '客户标签1',
                        size: 'default',
                        closable: true,
                    }],
                }]
            }, {
                id: 'formBasic',
                widget: 'form',
                layout: {
                    type: 'gridform',
                    column: 2
                },
                fields: [{
                    itemId: 'corporate_name',
                    widget: 'form-text',
                    label: '企业名称',
                }, {
                    itemId: 'legal_representative',
                    widget: 'form-text',
                    label: '法定代表人',
                }, {
                    itemId: 'uscc',
                    widget: 'form-text',
                    label: '统一社会信用代码',
                }, {
                    itemId: 'operate_status',
                    widget: 'form-text',
                    label: '登记状态',
                }, {
                    itemId: 'website',
                    widget: 'form-text',
                    label: '网站',
                }, {
                    itemId: 'province',
                    widget: 'form-text',
                    label: '所属省份',
                }, {
                    itemId: 'registered_address',
                    widget: 'form-text',
                    label: '地址',
                }],
                flex: true
            }]
        }, {
            class: [center, grid],
            layout: 'vertical',
            items: [{
                class: formTitle,
                id: 'title',
                widget: 'public-title',
                title: '联系信息',
            }, {
                id: 'formContact',
                widget: 'form',
                layout: {
                    type: 'gridform',
                    column: 2
                },
                fields: [{
                    itemId: 'telephone',
                    widget: 'form-text',
                    label: '电话',
                }, {
                    itemId: 'telephone_other',
                    widget: 'form-text',
                    label: '其他电话',
                }, {
                    itemId: 'email',
                    widget: 'form-text',
                    label: '邮箱',
                }, {
                    itemId: 'email_other',
                    widget: 'form-text',
                    label: '其他邮箱',
                }],
                flex: true
            }]
        }, {
            class: [center, grid],
            layout: 'vertical',
            items: [{
                class: formTitle,
                id: 'title',
                widget: 'public-title',
                title: '工商信息',
            }, {
                id: 'formCommerce',
                widget: 'form',
                layout: {
                    type: 'gridform',
                    column: 2
                },
                fields: [{
                    itemId: 'uscc',
                    widget: 'form-text',
                    label: '统一社会信用代码',
                }, {
                    itemId: 'corporate_name',
                    widget: 'form-text',
                    label: '企业名称',
                }, {
                    itemId: 'legal_representative',
                    widget: 'form-text',
                    label: '法定代表人',
                }, {
                    itemId: 'operate_status',
                    widget: 'form-text',
                    label: '登记状态',
                }, {
                    itemId: 'establishment_date',
                    widget: 'form-text',
                    label: '成立日期',
                }, {
                    itemId: 'registered_capital',
                    widget: 'form-text',
                    label: '注册资本',
                }, {
                    itemId: 'contributed_capital',
                    widget: 'form-text',
                    label: '实缴资本',
                }, {
                    itemId: 'approval_date',
                    widget: 'form-text',
                    label: '核准日期',
                }, {
                    itemId: 'organization_code',
                    widget: 'form-text',
                    label: '组织机构代码',
                }, {
                    itemId: 'registration_number',
                    widget: 'form-text',
                    label: '工商注册号',
                }, {
                    itemId: 'tin',
                    widget: 'form-text',
                    label: '纳税人识别号',
                }, {
                    itemId: 'corporate_type',
                    widget: 'form-text',
                    label: '企业类型',
                }, {
                    itemId: 'business_term',
                    widget: 'form-text',
                    label: '营业期限',
                }, {
                    widget: 'form-text',
                    label: '纳税人资质',
                    value: '-',
                }, {
                    itemId: 'industry',
                    widget: 'form-text',
                    label: '所属行业',
                }, {
                    itemId: 'province',
                    widget: 'form-text',
                    label: '所属地区',
                }, {
                    widget: 'form-text',
                    label: '登记机关',
                    value: '-',
                }, {
                    itemId: 'insured_number',
                    widget: 'form-text',
                    label: '参保人数',
                }, {
                    itemId: 'name_used',
                    widget: 'form-text',
                    label: '曾用名',
                }, {
                    itemId: 'registered_address',
                    widget: 'form-text',
                    label: '注册地址',
                }, {
                    itemId: 'last_report_address',
                    widget: 'form-text',
                    label: '最新年报地址',
                }],
                flex: true
            }]
        }, {
            class: center,
            layout: 'vertical',
            items: [{
                class: formTitle,
                id: 'title',
                widget: 'public-title',
                title: '经营范围',
            }, {
                id: 'formOperationScope',
                widget: 'form',
                layout: {
                    type: 'gridform',
                    column: 2
                },
                fields: [{
                    itemId: 'operation_scope',
                    widget: 'form-text',
                }],
                flex: true
            }]
        }]
    }]
};


